<template>
  <div class="order-contract">
    <div class="upload-double-sign">
      <u-sign
        v-if="current == 1"
        :page="curpage"
        @onStepChange="onStepChange"
      />
    </div>
    <div class="result-page">
      <result-page
        :datas="datas"
        :pages="'contractListPage'"
        v-if="current == 2"
        :title="'成功生成合同'"
        @onStepChange="onStepChange"
      />
    </div>
  </div>
</template>
<script>
import uSign from "../components/double-sign-m";
import resultPage from "../components/result-page";

export default {
  components: {
    uSign,
    resultPage
  },
  data() {
    return {
      curpage: "orderContractPage",
      current: 1,
      datas: [],
      imgFileList: [],
      submitLoading: false,
      data: {},
      form: {
        type: "销售"
      }
    };
  },
  watch: {},
  created() {},
  methods: {
    onStepChange(val, datas, imgFileList) {
      if (datas) this.datas = datas;
      if (imgFileList) this.imgFileList = imgFileList;
      this.current = val;
    },
    pageChange(pagination) {
      this.pageNum = pagination;
    },
    beforeDestroy() {}
  }
};
</script>

<style lang="scss" scoped>
.order-contract {
  background: #fff;
  .upload-double-sign {
    padding: 0 30px;
  }
  .step {
    padding: 50px;
  }
}
</style>
